 function field( id ) {
    var ele = document.getElementById( id );
    if ( !ele ) {
      alert( 'Specified element not found.  id="' + id + '"' );
    }
    return ele;
  }

 function AddRowSpan( table_id ) {
    var tbl = field( table_id );
     
    if ( tbl ) {
      var rc = tbl.rows.length;

      for ( var j = 0; j < rc ; j++) {
	var tbCell =  tbl.rows[j].cells[0];
	var labelCell = tbCell.innerHTML.substring(0,tbCell.innerHTML.indexOf('-'));
	var rspc = 1;
	
	j++;
	while(j < rc && tbl.rows[j].cells[0].innerHTML.indexOf(labelCell) == 0){
	  tbl.rows[j].deleteCell(0);
	  rspc++;
	  j++;
	}

	tbCell.setAttribute( 'rowSpan', rspc);
	tbCell.innerHTML = tbCell.innerHTML.substring(tbCell.innerHTML.indexOf('-')+1);
	j--;
      }
    }
  }